#include "PreCompile.hpp"
#include "BigInt.hpp"

namespace CPreProc
{
  static const int char_max = ~(unsigned char)0;

  BigUInt::BigUInt(unsigned int src)
  {
    size = 0;
    while(src)
    {
      parts[size] = src & char_max;
      size++;
      src >>= (sizeof(unsigned char) * 8);
    }
  }

  BigUInt& BigUInt::operator += (int i)
  {
    assert(!"not implemented yet");
    return *this;
  }

  BigUInt BigUInt::operator + (int i) const
  {
    assert(!"not implemented yet");

    BigUInt ret;
    for(int i = 0;i < size;i++)
    {

    }
    return ret;
  }

  BigUInt BigUInt::operator - (int i) const
  {
    assert(!"not implemented yet");

    BigUInt ret;
    for(int i = 0;i < size;i++)
    {

    }
    return ret;
  }

  BigUInt BigUInt::operator * (int i) const
  {
    assert(!"not implemented yet");

    BigUInt ret;
    for(int i = 0;i < size;i++)
    {

    }
    return ret;
  }

  BigUInt BigUInt::operator / (int b) const
  {
    int num_word_shifts = b % sizeof(unsigned int);
    int num_bit_shifts = b - num_word_shifts;
    assert(!"not implemented yet");

    BigUInt ret;
    for(int i = 0;i < size;i++)
    {

    }
    return ret;
  }

  bool BigUInt::operator > (const BigUInt &b) const
  {
    assert(!"not implemented yet");
    return false;
  }
}

